package com.googlecode.allinclusive.fw.web.struts2;

import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.RequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class BaseAction extends ActionSupport implements RequestAware, SessionAware, ServletResponseAware {

	/** request对象*/
	protected Map<String, Object> request;
	/** response对象*/
	protected HttpServletResponse response;
	/** session对象*/
	protected Map<String, Object> session;
	
	/**
	 * 注入request对象
	 */
	@Override
	public void setRequest(Map<String, Object> request) {
		this.request = request;
	}

	/**
	 * 注入session对象
	 */
	@Override
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}

	/**
	 * 注入response对象
	 */
	@Override
	public void setServletResponse(HttpServletResponse response) {
		this.response = response;
	}
}
